<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="DaosImpl.StaticsCountDaoImpl" %>
<%@ page import="Beans.StaticsInfo" %>

<html>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	 %>
  <head>
    <meta charset="UTF-8">
    <title>统计信息</title>
    <link href=<%=basePath+"/stylesheets/staticsInfo.css"%> type="text/css" rel="stylesheet">
    <style>
        html,body{
            height: 100%;
            margin:0;
            padding: 0;
        }
    </style>

  </head>
  
  <body>
    <div id="themeText">统计信息</div>
	<div id="showRoomFrame">
	<!-- 单元格边界以及间距 -->
    <table cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <th>顾客姓名</th>
            <th>身份证</th>
            <th>入住次数</th>
            <th>总消费金额</th>
        </tr>
        </thead>
        <tbody>
        <%
        	StaticsCountDaoImpl statics = new StaticsCountDaoImpl();
        	ArrayList<StaticsInfo> staticsList = new ArrayList<StaticsInfo>();
        	staticsList = statics.queryAllStaticsCount();
        	for(int i = 0;i<staticsList.size();i++){
        		%>
        		 <tr>
	            <td width="25%"><%=staticsList.get(i).getName() %></td>
	            <td width="25%"><%=staticsList.get(i).getId() %></td>
	            <td width="25%"><%=staticsList.get(i).getCount() %></td>
	            <td width="25%"><%=staticsList.get(i).getMoney() %></td>
        		</tr>
        		<%
        	}
         %>
        </tbody>
    </table>
	</div>
  </body>
</html>
